{% extends "main/base.html" %}
{% load i18n %}
{% block title %}{% trans '更新设备价格' %}{% endblock %}
{% block content %}
<div class="col-lg-offset-2 col-lg-8">
    <div class="panel">
        <header class="panel-heading">
            {% trans "更新设备价格" %}
            {% if form.errors %}
            <p>{% trans "提交的数据有误,请认真检查!" %}</p>
            {% endif %}
        </header>
        <div class="panel-body">
            <form method="post" enctype="multipart/form-data" class="form-horizontal">{% csrf_token %}
                {{ form.non_field_errors }}
                <div class="form-group">
                    <div class="col-lg-2">{{ form.equipment_code.label_tag }}</div>
                    <div class="col-lg-4">{{ form.equipment_code }}{{ form.equipment_code.errors }}</div>
                </div>
                <div class="form-group">
                    <div class="col-lg-2">{{ form.equipment_cn.label_tag }}</div>
                    <div class="col-lg-10">{{ form.equipment_cn }}{{ form.equipment_cn.errors }}</div>
                </div>
                <div class="form-group">
                    <div class="col-lg-2">{{ form.equipment_en.label_tag }}</div>
                    <div class="col-lg-10">{{ form.equipment_en }}{{ form.equipment_en.errors }}</div>
                </div>
                <div class="clearfix"></div>
                <div class="form-group">
                    <div class="col-lg-2">{{ form.cost.label_tag }}</div>
                    <div class="col-lg-2">{{ form.cost }}{{ form.cost.errors }}</div>
                    <div class="col-lg-2">{{ form.dist_price.label_tag }}</div>
                    <div class="col-lg-2">{{ form.dist_price }}{{ form.dist_price.errors }}</div>
                    <div class="col-lg-2">{{ form.basic_price.label_tag }}</div>
                    <div class="col-lg-2">{{ form.basic_price }}{{ form.basic_price.errors }}</div>
                </div>
                <div class="clearfix"></div>
                <div class="form-group" align="right">
                    <div class="col-lg-12">
                         <button type="submit" class="btn btn-danger">{% trans "更新" %}</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{% endblock %}